<?php 
	function beta24_post($catname,$title,$summary, $content){
		//discuz  login 
		$parameter = array(	
							"LoginForm[returnUrl]"=>"http%3A%2F%2Fzuoxuan520.sinaapp.com%2F", 
							"LoginForm[email]"=>'smarteng@qq.com',
							"LoginForm[password]"=>"123123",
							"LoginForm[rememberMe]"=>1,
							"yt0"=>'登陆',
							);
	
		$opt_arr = array(
				CURLOPT_REFERER => "http://zuoxuan520.sinaapp.com/login",  //referer	
				);
				
		$loginurl = 'http://zuoxuan520.sinaapp.com/login';
		$loginpage = makeRequest($loginurl,
					"POST", 
					$parameter, 
					true, 
					ROOT_PATH."/baidu/cookie/zuoxuan520.txt",
					ROOT_PATH."/baidu/cookie/zuoxuan520.txt",
					$opt_arr
					);
		//printlog("ssss: $loginpage", "discuz22");
		$url = 'http://zuoxuan520.sinaapp.com/post/create';
		$opt_arr = array(
				CURLOPT_REFERER => "http://zuoxuan520.sinaapp.com/post/create",  //referer	
		);
		$postparameter = array(	
							"PostForm[title]"=>$title, 
							"PostForm[source]"=>'即美说',
							"PostForm[tags]"=>"减肥",
							"PostForm[summary]"=>$summary,
							"PostForm[content]"=>$content,
							"yt0"=>'递交',
							);
		$postpage = makeRequest($url,
					"POST", 
					$postparameter, 
					true, 
					ROOT_PATH."/baidu/cookie/zuoxuan520.txt",
					ROOT_PATH."/baidu/cookie/zuoxuan520.txt",
					$opt_arr
		);
		echo 'ok';
	}
?>